package com.heima.user.controller.v1;

import com.heima.model.user.pojos.ApUser;
import com.heima.user.service.ApUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/v1/auth")
public class ApUserController {

    @Autowired
    ApUserService service;

    @PostMapping("/findApUserById/{id}")
    public ApUser findApUserById(@PathVariable Integer id){
        ApUser apUser = service.getById(id);
        return apUser;
    }
}
